package net.xju_springjdbc_13_14.service.impl;

import net.xju_springjdbc_13_14.dao.UserDao;
import net.xju_springjdbc_13_14.entity.User;
import net.xju_springjdbc_13_14.service.UerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.FileNotFoundException;
import java.util.Collections;
import java.util.List;

@Service
public class UserServiceImpl implements UerService {

    @Autowired
    private UserDao userDao;

    @Override
    public List<User> selectAll() {
        return userDao.selectAll();
    }

    @Override
    public void insert(User user) throws FileNotFoundException {
        userDao.insertUser(user);
    }
}
